<template>
  <div rounded-58px bg="#fff" pa-58px box-border mx-58px>
    <div w-full flex items-center justify-between>
      <div flex items-center>
        <img
          v-if="props.res.data.img"
          :src="props.res.data.img"
          w-52px
          h-58px
          mr-29px
        />
        <div font-500 text="#000" text-46px>{{ props.res.data.title }}</div>
      </div>
      <div flex items-center @click="moreList">
        <div font-500 text="#7D7D7D" text-35px mr-23px>更多</div>
        <img src="@/static/more_right.png" w-17px h-29px />
      </div>
    </div>
    <div>
      <template v-for="(item, index) in props.res.data.list">
        <article_item
          :item="item.url"
          classifyStyle="1"
          @click="clickSwiper(index)"
        ></article_item>
      </template>
    </div>
  </div>
</template>

<script setup lang="ts">
import { modelNavigateTo } from './tpl-v3'
import { px2rpx } from './px2rpx'
import article_item from '@/components/article-item/index.vue' //轮播图
const height = uni.getSystemInfoSync().screenWidth * 0.2
const props = defineProps(['res'])
console.log('文章列表', props)
function clickSwiper(index: number) {
  modelNavigateTo(props.res.data.list[index])
}

function moreList() {
  uni.navigateTo({
    url: '/pages/funcPage?functionCode=' + props.res.data.functionCode
  })
}
</script>
<style lang="scss" scoped>
img,
image {
  display: block !important;
}
</style>
